<template>
  <div class="institutions-jobs-area">
    <treeInfo @getOrgizationInfo="getOrgizationInfo" />
    <div class="work-area">

      <MapBaidu ref="mapRef" />
    </div>
  </div>
</template>

<script>
import treeInfo from '@/components/treeInfo'
import { getMapinfoApi } from '@/api/ogization'

export default {
  components: {
    treeInfo
  },
  data() {
    return {
      mapInfo: {}
    }
  },
  methods: {
    async getOrgizationInfo(nodekey) {
      const res = await getMapinfoApi(nodekey)
      this.mapInfo = res
      this.$nextTick(() => {
        this.$refs.mapRef.initMap(res)
      })
    }

  }
}
</script>

<style lang="scss" scoped>
.institutions-jobs-area{
  display: flex;
  .work-area{
    flex: 1;
    margin: 12px;
    .el-card{
     ::v-deep .el-card__header{
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        background-color: #f8faff;
        .header-text{
          font-size: 16px;
          font-weight: 700;
          color: #2a2929;
        }
       .el-button {
          width: 90px;
          background-color: #e15536;
          color: #fff;
          border-radius: 5px;
        }
      }
    }
  }
}
// #bdMap{
//   box-sizing: border-box;
//   margin-top: 15px;
//   min-height: 700px;
//   // height: 100%;
//   z-index: 0;
// }
</style>
